	<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" class="no-js">

    <head>
        <title>美颜社前台登录</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
        <!-- CSS -->
        <link rel="stylesheet" href="${pageContext.request.contextPath }/js/assets/css/supersized.css">
        <link rel="stylesheet" href="${pageContext.request.contextPath }/js/assets/css/style.css">
    </head>
    <body>
        <div class="page-container">
            <h1>登录</h1>
            <form  method="post" id="form">
                <input type="text" name="account" class="username" placeholder="Username">
                <input type="password" name="password" class="password" placeholder="Password">
                <button type="button" onclick="login()">登录</button>
            </form>
            <a  href="${pageContext.request.contextPath }/proltal/zn1/forget">忘记密码</a>
        </div>
        <!-- Javascript -->
        <script src="${pageContext.request.contextPath }/js/assets/js/jquery-1.8.2.min.js"></script>
        <script src="${pageContext.request.contextPath }/js/assets/js/supersized.3.2.7.min.js"></script>
        <script src="${pageContext.request.contextPath }/js/assets/js/supersized-init.js"></script>
    </body>
    <script>
    	function login(){
    		$.ajax({
    			type:"post",
    			url:"${pageContext.request.contextPath }/proltal/zjj1/login",
    			data:$("#form").serialize(),
    			success:function(msg){
    				if(msg.status!=0){
    					alert(msg.msg);
    					return ;
    				}
    				location.href="${pageContext.request.contextPath }/proltal/zn1/findQt";
    				if(msg.data.user_type=='1'){
    					location.href="${pageContext.request.contextPath }/proltal/zn1/findQt";
    					return;
    				}
    				location.href="${pageContext.request.contextPath }/proltal/zjj1/loginmenu"; 
    			}
    		});
    	}
    </script>
</html>